package com.elvt.bolg.mapper;

import com.elvt.bolg.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserMapper {
    /**
     * 根据用户名查询用户
     * @param username 条件
     * @return
     */
    @Select("select * from tb_user where username=#{username}")
    User queryUserByusername(String username);
    @Select("select *  from tb_user where nick=#{nick} and userid!=#{userid}")
    User queryUserByNickAndUserID(@Param("nick") String nick, @Param("userid") Integer userid);
   
    int updateUser(User user);
}
